Skip to main content

What’s New

Qrvey 8.7
Version 8.7 of the Qrvey platform is now available to customers! This version includes new features including area charts, the ability to pivot and export data, as well as numerous bug fixes and performance improvements.
Learn More
Qrvey 8.6
Version 8.6 of the Qrvey platform is now available to customers. This version includes several new feature enhancements and performance improvements.
Learn More
Required Update for 8.5.1
Attention 8.5.1 customers: for any 8.5.1 instance deployed prior to 08/05/2024, an update is required to ensure you are running the latest images.
Learn More
Qrvey 8.5
Version 8.5 (LTS) of the Qrvey platform is now available to customers. This version includes several new features and performance improvements.
Learn More
End-of-life Schedule
We've added a new article that lists the features and endpoints that have been scheduled for deprecation. All features and endpoints will be supported for (1) year after the release date of the LTS version that contains the alternative.
Learn More
Version: 8.4

Customizing the Appearance Using CSS

This article provides guidelines for properly using CSS to customize the visual theme of embedded widgets. To see an example in codepen of how CSS variables can be used with embedded widgets, click the following link.

Naming Convention

Use the following naming convention for CSS variables:

--qv-[module]-[property]-[attribute]

  • --qv-: Every CSS variable in Qrvey must start with the prefix -qv-. This prefix minimizes the risk of name collision when embedding widgets, and it helps to identify Qrvey's own variables.

  • Module: Refers to sections or areas in which the product is divided. It is necessary for variables that only affect a specific area of the product.

    • For global variables, this value must be the global word: -qv-global-.
    • For variables that apply only to the chart, they must start with -qv-chart-.
  • Property:The CSS property to which the variable applies.

    • Color
    • Font
    • Margin / padding
    • Border
    • Example: -qv-color- , -qv-chart-color
  • Attribute: Further context or detail of the variable's purpose. Examples:

    • --qv-global-color-main
    • --qv-global-color-text
    • --qv-global-color-title
    • --qv-global-color-main-hover
    • --qv-global-font-size
    • --qv-global-font-family
    • --qv-global-border-border
    • --qv-global-border-radius-radius
    • --qv-chart-font-family
    • --qv-chart-font-size-label
    • --qv-chart-font-size-title
    • --qv-chart-font-font-size-tooltip

Priority and Fallback

Some components may depend on more than one CSS variable or custom property, so it is important to define the priority of which one takes precedence. In addition, you should always define a fixed value as a last resort (or fallback).

The var() function evaluates the first argument, and, if it exists, it finishes its evaluation. Otherwise, it evaluates the second argument. This second argument can be another var() function, which indicates that the first argument is the most relevant in case all CSS variables exist. For example:

.cl1 {

background-color: var(--qv-global-color-main, orange)

}

.cl2 {

background-color: var(--qv-chart-cell-color-main, var(--qv–global-color-main, orange))

}

For .cl1, if the variable --qv-color-main does not exist, the fixed value orange will be applied.

For .cl2, if --qv-cell-color-main does not exist, --qv-color-main will be evaluated, and if it does not exist, orange will be applied.

Note: When using another CSS variable as fallback in the var() function, it must be enclosed inside another var() function. For more information on using var(), see https://developer.mozilla.org/en-US/docs/Web/CSS/var and https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties.

Inheritance

Like other aspects of CSS, CSS variables are cascading in nature. As such, the value of a variable is inherited from its parent (and it will inherit from its parent), if it is not defined. The following example demonstrates how to overwrite a CSS variable by making a declaration with a higher level of detail:

:root {
--qv-color-main: blue;
--qv-cell-color-main: pink;

}

.overwrite {
--qv-color-main: red;

}

.cl1 {
background-color: var(--qv-color-main, orange)

}

.cl2 {
background-color: var(--qv-cell-color-main, var(--qv-color-main, orange))

}

To see an example in codepen of inheritance, click the following link.

You can also assign the inline CSS variables in a closer node/element.

Qrvey widgets usually assign CSS variables in the <body/> or in the :root{} pseudo-class.

Qrvey Component Library

Most of the library components depend on the main color, and this is applicable for the default Qrvey theme. However, you may want to give buttons a different shade than the main one. In this case, assign a main variable and an optional variable. For example:

var(--qv-btn-color-main, var(–qv-color-main, orange))

For more information on the design system, see Qrvey Design System.

Backward Compatibility (in progress)

To continue to support legacy variables, assign each variable in a node. For example, to support --qv-main-color, assign the variable using the following technique:

body {

-–qv-main-color: var(--qv-global-main-color, orange);

}

Colors

Among the customization variables we find the color variables, which allow by means of their declaration, as their name indicates, to change the main colors of the theme, which are the following ones:

Variable nameFunctionalityExample
--qv-main-colorModifies the main color of the Theme. The default is #E6773D.
--qv-main-text-colorModifies the main color of the Theme fonts. The default is white.
--qv-secondary-colorModifies the secondary color of the Theme. The default is is #25486F.
--qv-tab-bar-colorModifies the background of the Navigation Tab Bar. The default is is #25486F.
--qv-info-notification-colorModifies the color of the informative notifications. The default is #4FA6DA.
--qv-success-notification-colorModifies the color of successful notifications. The default is #7DC58C.
--qv-warning-notification-colorModifies the color of warning notifications. The default is #FFB75D.
--qv-error-notification-colorModifies the color of error notifications. The default is #C23934.
--qv-info-colorModifies the color of notifications and information components. The default is #4FA6DA.
--qv-success-colorModifies the color of notifications and success components. The default is #7DC58C.
--qv-warning-colorModifies the color of notifications and warning components. The default is #FFB75D.
--qv-error-colorModifies the color of notifications and error components The default is #C23934.
--qv-an-chart-border-colorModifies the border color of the chart panes.
--qv-an-chart-background-colorModifies the background color of the chart panels.
--qv-an-chart-header-border-colorModifies the color of the bottom border of the header of the chart panels.
--qv-an-chart-header-border-color-optionsModifies the border color of the header options of the chart panels.
--qv-an-chart-header-background-color-optionsModifies the background color of the chart panel header options.
--qv-an-chart-header-background-color-hover-optionsModifies the background color in hover state of the chart panel header options.
--qv-global-close-modal-colorModifies the color of the modal close icon.
--qv-global-close-modal-hover-colorModifies the color of the close modal icon in hover state.
--qv-global-overlay-colorModifies the modal overlay color.
--qv-global-threedots-icon-colorModifies the color of the three-dot options icon.
--qv-global-tooltips-background-colorModifies the background color of tooltips.

Fonts

To modify the font type of the components inside the widget, use the following global CSS variable:

Variable nameFunctionalityExample
--qv-global-font-familyChanges the font family across the complete interface

Support Custom Font Family On Visualizations

Version 8.3 of the Qrvey platform introduced visualizations using echarts, which you cannot manipulate through CSS.  Instead, those charts render with canvas. In version 8.2 and earlier, visualizations worked by svg and allowed immediate changes by elements. By themes performance, constant requests cannot be made to monitor the immediate change by CSS, therefore we defined that it must be necessary that the user has the custom variable of --qv-global-font-family declared before, or he should reload the theme, or the widget so that the changes can be applied when the default option is selected in the font dropdown of the themes modal.

Positions

To modify the location of specific components in the navigation menu, use the position variables. The following table lists the available position variables:

Variable nameFunctionalityExample
--qv-global-position-toast-rightModifies the horizontal position of the notification component.
--qv-global-position-toast-topModifies the vertical position of the notification component.
--qv-global-position-modal-top-offsetModifies the distance of the modal with respect to the height of the browser window.
--qv-position-floatingmenu-rightModifies the horizontal position of the floating menu component.
--qv-position-floatingmenu-bottomModifies the vertical position of the floating menu component.

Borders

To modify the border radius of the components that are inside the widget, use the following global CSS variable:

--qv-global-border-radius

The following table lists specific border variables for each of the components:

Variable nameFunctionalityExample
--qv-global-border-radiusModifies the border radius globally.
--qv-global-border-radius-buttonModifies the border radius of the button component.
--qv-global-border-radius-cardModifies the border radius of the application card component.
--qv-global-border-radius-dropdownModifies e the border radius of the drop-down list component.
--qv-global-border-radius-inputModifies the border radius of the textboxes component.
--qv-global-border-radius-modalModifies the border radius of the modals component.
--qv-global-border-radius-toastModifies the border radius of the Notifications component.
--qv-global-border-radius-pillsModifies the border radius of the pills component.
--qv-global-border-radius-tagsModifies the border radius of the tags component.
--qv-global-border-radius-tableModifies the border radius of the table component.
--qv-global-border-radius-dropdown-listModifies the border radius of the list component.
--qv-global-border-radius-tooltipsModifies the border radius of the tooltips component.
--qv-global-border-radius-qvdatepickerModifies the border radius of the calendar component.
--qv-global-border-radius-switchModifies the border radius of the switch button component.
--qv-global-border-radius-color-pickerModifies the border radius of the color selection component
--qv-global-border-radius-color-picker-previewModifies the border radius of color selection preview component.
--qv-global-border-radius-value-listModifies the border radius of the value list component component.
--qv-global-border-radius-input-boxModifies the border radius of the input box component.
--qv-global-border-radius-rich-editorModifies the border radius of the advanced text input component.
Analytic Widget
--qv-an-border-radius-chart-panelModifies the border radius of the Chart Panels component.
--qv-an-border-radius-cb-action-chartModifies the border radius of the Chart Builder action list component.
--qv-an-border-radius-cb-item-valuesModifies the border radius of the Chart Builder dataset list component.
Dashboard:
--qv-at-border-radius-db-menu-iconsModifies the border radius of the dashboard menu component.
--qv-at-border-radius-db-draganddropModifies the border radius of the drag-n-drop component in the Dashboard Builder.
--qv-at-border-radius-db-input-boxModifies the border radius of the menu component inside the Dashboard Builder.
--qv-at-border-radius-db-draggable-datasetModifies the border radius of the dragg component in the Dashboard Builder.
--qv-at-border-radius-db-expandable-cardModifies the border radius of the expandable card component inside the Dashboard Builder.
--qv-at-border-radius-db-imageModifies the border radius of the image component inside the Dashboard Builder.
--qv-at-border-radius-db-grid-itemModifies the border radius of the grid component inside the Dashboard Builder.
User Management
--qv-at-border-radius-qum-cardModifies the border radius of the card component in User Management.
Workflows:
--qv-at-border-radius-workflows-cardModifies the border radius of the card component in workflows.
--qv-at-border-radius-workflows-sms-contModifies the border radius of the SMS component in workflows.
--qv-at-border-radius-workflows-email-contModifies the border radius of the email component in workflows.
--qv-at-border-radius-workflows-item-sidebarModifies the border radius of the sidebar list component.
--qv-at-border-radius-workflows-log-detailsModifies the border radius of the log details component.
--qv-at-border-radius-workflows-expandible-cardModifies the border radius of expandable card component.

Padding

To modify the internal space of supported components, use the padding variables.

Variable nameFunctionalityExample
--qv-an-padding-chart-panel-headerModifies the internal space of the header of the chart panel component